import requestProxy from '@/utils/request';
const { request } = requestProxy;

export function addQuestion(data) {
  return request({
    url: 'admin/question/add',
    method: 'post',
    data
  });
}

export function editQuestion(data) {
  return request({
    url: 'admin/question/edit',
    method: 'put',
    data
  });
}

export function mergeQuestion(data) {
  return request({
    url: 'admin/question/merge',
    method: 'put',
    data
  });
}

export function deleteQuestion(data) {
  return request({
    url: 'admin/question/delete',
    method: 'delete',
    data
  });
}

export function getQuestionDetail(id) {
  return request({
    url: `admin/question/detail/${id}`,
    method: 'get'
  });
}

export function getFeedbackList(params) {
  return request({
    url: 'admin/question/detail/feedback',
    method: 'get',
    params
  });
}

export function getQuestionList(params) {
  return request({
    url: 'admin/question/list',
    method: 'get',
    params
  });
}
